package com.gxy.learn.design.model.behaviour.interpreter;

import java.util.HashMap;
import java.util.Map;

/**
 * @description: 环境
 * @author: gaoxueyong
 * @Date: 2022/11/9 10:49
 */
public class Context {
    private Map<Variable,Integer> map = new HashMap<>();
    public void assign(Variable variable,Integer value){
        map.put(variable,value);
    }

    public Integer getValue(Variable variable){
        return map.get(variable);
    }
}
